package com.imooc.reader.portal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.imooc.reader.portal.entity.Evaluation;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface EvaluationMapper extends BaseMapper<Evaluation> {
    @Select("select e.*,m.nickname from evaluation e , member m where e.member_id = m.member_id and e.book_id = #{bookId} and e.state='enable' order by e.create_time desc")
    public List<Map> selectByBookId(Long bookId);
}
